<?php
// display user profile
//
// digiboard by digitalboom.org
// http://www.digitalboom.org
//
// Information Technology program
// Sirindhorn International Institute of Technology
// Thammasat University, Rangsit Campus
// http://www.siit.tu.ac.th
//
// author: hoho
// first created on: 2002 May 07
// last modified on: 2008 Jun 18 by ezy

include("settings/config.inc.php");
include("settings/accounts.inc.php");
include("lib/util.inc.php");

extract($_POST);
extract($_GET);

//Select user profile from DB

$db_link = dgb_db_connect();
$query = "SELECT * FROM ".$DGB["DB_USERS_TABLE"]." WHERE Username = '$ProfileName' ";
$result = mysql_query($query,$db_link);
$data = mysql_fetch_row($result);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title><?=$DGB["WEBBOARD_NAME"];?> / view profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$DGB["ENCODING"];?>">
<link rel="stylesheet" href="<?=$DGB["STYLESHEET"];?>" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="1" align="center">
 <tr> 
  <td align="center"> 
   <table width="300" border="0" cellspacing="0" cellpadding="1" bgcolor="#CCCCCC">
    <tr> 
     <td valign="top"> 
      <table width="300" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="#FFFFEE">
       <tr> 
        <td colspan="3" class="mbMouseOver"><b><?=$ProfileName;?> profile</b></td>
       </tr>
       <tr valign="top"> 
        <td width="10">&nbsp;</td>
        <td width="100">Username<br><br></td>
        <td><?=$data[1];?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Name</td>
        <td><?= strip_html($data[7]); ?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Lastname</td>
        <td><?= strip_html($data[8]); ?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Nickname<br><br></td>
        <td><?= strip_html($data[9]); ?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>E-mail</td>
        <td><?= strip_html($data[3]); ?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>ICQ</td>
        <td><?= strip_html($data[4]); ?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>MSN</td>
        <td><?= strip_html($data[5]); ?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Website<br><br></td>
        <td><?php if ($data[6] != "") { ?><a href="<?= $data[6]; ?>" title="<?=$ProfileName;?> website" target="_blank"><?= strip_html($data[6]); ?></a><?php } ?></td>
       </tr>
       <tr> 
        <td colspan="3" class="mbMouseOver"><b>SIIT student info</b></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>ID</td>
        <td><?= strip_html($data[10]); ?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Program<br><br></td>
        <td><?= strip_html($data[11]); ?></td>
       </tr>
       <tr> 
        <td colspan="3" class="mbMouseOver"><b>personal info</b></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Birthdate</td>
        <td><?=$data[14];?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Address</td>
        <td><?= strip_html($data[15]); ?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Phone<br><br></td>
        <td><?= strip_html($data[16]); ?></td>
       </tr>
       <tr> 
        <td colspan="3" class="mbMouseOver"><b>stats</b></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Total topics posted</td>
        <td align="right"><?=$data[17];?></td>
       </tr>
       <tr valign="top"> 
        <td>&nbsp;</td>
        <td>Total answers posted<br><br></td>
        <td align="right"><?=$data[18];?></td>
       </tr>
      </table>
     </td>
    </tr>
   </table>
   <br>
   <a class="linkBtn" href="javascript:window.close()"><font size="2">close window</font></a> 
  </td>
 </tr>
</table>

</body>
</html>